package com.bojiu.lawsearch.lawsearch.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 * @author: afdiao
 * @Date：2020/3/23 23:18
 * @Description:
 */
@ApiModel(value = "问题对象", description = "用于提出的问题明细")
@Table(name = "mst_user_question")
@Data
public class UserQuestion {

    @ApiModelProperty(value = "问题id", required = false)
    @Column(name = "id")
    private Integer id;

    @ApiModelProperty(value = "用户id", required = false)
    @Column(name = "userId")
    private Integer userId;

    @ApiModelProperty(value = "问题标签id", required = true)
    @Column(name = "labelId")
    private Integer labelId;

    @ApiModelProperty(value = "问题价格", required = true)
    @Column(name = "price")
    private Double price;

    @ApiModelProperty(value = "问题标题", required = true)
    @Column(name = "title")
    private String title;

    @ApiModelProperty(value = "问题描述", required = true)
    @NotNull(message = "提问的问题并不能为空")
    @Column(name = "question")
    private String question;

    @ApiModelProperty(value = "问题状态", required = false)
    @Column(name = "state")
    private Integer state;
}
